package local.blueheart.spring.bootstrap.other;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

import java.io.IOException;

public class JsoupTest {

    public static void main(String[] args) throws IOException {
        Document doc = Jsoup.connect("http://www.baidu.com").get();
        String title = doc.title();
        System.out.println(title);
        String html = doc.outerHtml();
        System.out.println(html);

//        System.out.println("================");
//        String parseHtml = Jsoup.parse("http://www.baidu.com").html();
//        System.out.println(parseHtml);

    }
}
